# 发送带参数的请求
import requests


# bing搜索python的url https://cn.bing.com/search?q=python

url = 'https://cn.bing.com/search'
kw = {'q': 'Python'}
header = {
    'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36'
}
r = requests.get(url, headers=header, params=kw)
print(r.request.url)
